import 'package:black_movice/views/pages/user/UserInfo.dart';
import 'package:black_movice/views/pages/user/UserMenuList.dart';
import 'package:flutter/material.dart';

class User extends StatefulWidget {
  const User({super.key});

  @override
  State<User> createState() => _UserState();
}

class _UserState extends State<User> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    // 获取顶部安全区的高度
    double topSafeAreaHeight = MediaQuery.of(context).padding.top;
    return Column(
      mainAxisSize: MainAxisSize.min, // 添加这一行
      children: [
        // 个人资料简介
        Container(
          height: MediaQuery.of(context).size.height * 0.33,
          padding: EdgeInsets.only(top: topSafeAreaHeight),
          decoration: BoxDecoration(
            gradient: LinearGradient(
              colors: [Colors.lightBlueAccent, Colors.white],
              begin: Alignment.topCenter,
              end: Alignment.bottomCenter,
            ),
          ),
          child: UserInfo(),
        ),
        // 菜单列表
        Expanded(child: UserMenuList()),
      ],
    );
  }
}
